package test2.solr;

import java.io.IOException;
import java.util.Date;

import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.common.SolrInputDocument;

public class App {
	
	public static void main(String[] args) throws SolrServerException, IOException {
		HttpSolrClient client = SolrUtil.getSolrClient();
//		SolrInputDocument doc = new SolrInputDocument();
//		doc.addField("id", "26379");
//		doc.addField("text", "让我们一起唱响世界和谐之歌之音吧");
//		client.add("core2", doc);
//		
//		SolrInputDocument doc2 = new SolrInputDocument();
//		doc2.addField("id", "26380");
//		doc2.addField("text", "让世界处于一个和谐状态，大家共谱和谐之歌");
//		client.add("core2", doc2);
		client.deleteById("core2", "9999");
		client.deleteById("core2", "9993");
		client.commit("core2");
		client.close();
	}

}
